package com.derbysoft.dswitch.adapter.ihg.common.domain;

import com.derbysoft.dswitch.adapter.ihg.common.domain.support.PersistenceSupport;
import com.derbysoft.dswitch.adapter.ihg.common.utils.Constants;
import com.derbysoft.remote.dswitch.hotel.constants.FreeMealType;
import com.derbysoft.remote.dswitch.hotel.constants.FreeMealUnit;

import javax.persistence.*;

/**
 * User: jason
 * Date: 2013-01-05
 */
@Entity
@Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"channelPattern", "hotelPattern", "ratePlanPattern", "roomTypePattern"})})
public class FreeMealStrategy extends PersistenceSupport {

    @Enumerated(EnumType.STRING)
    private FreeMealType type;

    @Enumerated(EnumType.STRING)
    private FreeMealUnit unit;

    private Integer quantity;

    @Column(length = 100)
    private String description;

    @Column(nullable = false, length = 50)
    private String channelPattern = Constants.ASTERISK;

    @Column(nullable = false, length = 50)
    private String hotelPattern = Constants.ASTERISK;

    @Column(nullable = false, length = 50)
    private String ratePlanPattern = Constants.ASTERISK;

    @Column(nullable = false, length = 50)
    private String roomTypePattern = Constants.ASTERISK;

    public FreeMealType getType() {
        return type;
    }

    public void setType(FreeMealType type) {
        this.type = type;
    }

    public FreeMealUnit getUnit() {
        return unit;
    }

    public void setUnit(FreeMealUnit unit) {
        this.unit = unit;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getChannelPattern() {
        return channelPattern;
    }

    public void setChannelPattern(String channelPattern) {
        this.channelPattern = channelPattern;
    }

    public String getHotelPattern() {
        return hotelPattern;
    }

    public void setHotelPattern(String hotelPattern) {
        this.hotelPattern = hotelPattern;
    }

    public String getRatePlanPattern() {
        return ratePlanPattern;
    }

    public void setRatePlanPattern(String ratePlanPattern) {
        this.ratePlanPattern = ratePlanPattern;
    }

    public String getRoomTypePattern() {
        return roomTypePattern;
    }

    public void setRoomTypePattern(String roomTypePattern) {
        this.roomTypePattern = roomTypePattern;
    }
}
